

#ifndef _BUZZER_CTRL_H_
#define _BUZZER_CTRL_H_


#include "stdint.h"

#define BEEP_NON_STOP  65535
#define BEEP_ALARM     100
#define BEEP_NOTICE    200

typedef enum
{
	BUZZER_X1,
	BUZZER_X2,
	BUZZER_ALL

}ENUM_BUZZER_NUM;


typedef enum
{
	BUZZER_IDLE,
	BUZZER_BEEP,
	BUZZER_STOP

}ENUM_BUZZER_FSM;


typedef struct
{

	ENUM_BUZZER_FSM FSM;
	
	uint16_t beep_times;
	uint16_t beep_cnt;
	
	uint16_t beep_holdtime;
	
	uint16_t now_time;
	uint16_t exe_time;
	
	uint8_t  gpio_output;
	

}STR_BUZZER_HDL;

extern void buzzer_param_set(ENUM_BUZZER_NUM num, uint16_t times, uint16_t holdtime);
extern uint8_t buzzer_beep_ctrl(ENUM_BUZZER_NUM num);



#endif



